<?php


namespace app\index\controller;

use think\admin\Controller;
use think\Db;

/**
 * Class Index
 * @package app\index\controller
 */
class Index extends Controller
{

    public $table = 'ScanJobUrl';

    public function index()
    {

        if (!isset($_POST['data'])) {
            return $this->error("POST中的data未找到");
        }

        //接收数据
        $data = json_decode($_POST['data'], true);

        $this->app->db->name($this->table)->strict(false)->insertAll($data);


        return $this->success();

    }
}